import request from 'utils/request'

interface GetAllStationListOption {
  stationName: string
  dzcode: string
  pageSize: number
  pageIndex: number
  timestamp: string
}

// 公交站列表
export function getAllStationList ({ stationName, dzcode, pageSize, timestamp, pageIndex }: GetAllStationListOption) {
  return request({
    url: 'bus/busAnalysis/getAllStationList',
    method: 'GET',
    params: {
      stationName,
      dzcode,
      pageSize,
      pageIndex,
      timestamp
    }
  })
}

interface GetStationDetailOption {
  dzcode?: string
  stationId: string
}

// 站点详情
export function getStationDetail ({ dzcode, stationId }: GetStationDetailOption) {
  return request({
    url: 'bus/busAnalysis/getStationDetail',
    method: 'GET',
    params: {
      dzcode,
      stationId
    }
  })
}
